package adv.i31.robot;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;

public class RobotConnectionFile implements RobotConnection {

	private File mFile;
	private BufferedWriter mWriter;
	private FileOutputStream mOutputStream;

	public RobotConnectionFile() throws IOException {
		mFile = new File("C:\\test.txt");
		mOutputStream = new FileOutputStream(mFile);
		mWriter = new BufferedWriter(new OutputStreamWriter(mOutputStream));
	}

	@Override
	public void sendString(String s) throws IOException {
		mWriter.write(s);
		mWriter.flush();
	}

	@Override
	public OutputStream getOutputStream() throws IOException {
		return mOutputStream;
	}

	@Override
	public InputStream getInputStream() throws IOException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String receiveString() throws IOException {
		// TODO Auto-generated method stub
		return null;
	}

}